import { request } from '../request'
import { userAPI } from '../api'

// 用户登录函数
export function $_institutions(id, params) {
  return request({
    isAuthorization: false,
    url: userAPI.institutions(id),
    params
  })
}
export function $_getInstitutionServices(params) {
  return request({
    url: userAPI.getInstitutionServices,
    isAuthorization: false,
    params
  })
}
export function $_InstitutionServices(id, params) {
  return request({
    url: userAPI.InstitutionServices(id),
    isAuthorization: false,
    params
  })
}

export function $_getOrdersListByUserId(data) {
  return request({
    url: userAPI.getOrdersListByUserId,
    method: 'POST',
    data
  })
}

export function $_consultationRequest(id, params) {
  return request({
    url: userAPI.consultationRequest(id),
    params
  })
}

export function $_searchFrontDoctor(data) {
  return request({
    url: userAPI.searchFrontDoctor,
    method: 'POST',
    data,
    isAuthorization: false
  })
}

export function $_extraOrderWxPay(data) {
  return request({
    url: userAPI.extraOrderWxPay,
    method: 'POST',
    data
  })
}
export function $_wxQueryPay(params) {
  return request({
    url: userAPI.wxQueryPay,
    params,
    isLoading: false
  })
}
export function $_extraProject(id, params) {
  return request({
    url: userAPI.extraProject(id),
    params
  })
}
export function $_saveRegistryUser(data) {
  return request({
    url: userAPI.saveRegistryUser,
    method: 'POST',
    data
  })
}
export function $_checkUserPhone(phone, params) {
  return request({
    url: userAPI.checkUserPhone(phone),
    isAuthorization: false,
    params
  })
}
export function $_updateOrdersMainBody(data) {
  return request({
    url: userAPI.updateOrdersMainBody,
    method: 'POST',
    data
  })
}
